package personal.xjl._23java1studentdemo.spring;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component("hanxuebaoma")    //@Controller,@Service,@Mapper,组件
@Data@AllArgsConstructor@NoArgsConstructor
public class Car {
    @Value("hanxuebaoma")
    String id;
    @Value("BMW")   //为属性赋值
    String brand;
    @Value("600")
    int maxSpeed;
}
